package com.ssy.lingxi.platform.template.service.model.dto.web;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Map;


/**
 * 活动页 - 新增/修改/装修 - DTO
 * @author fhj
 * @version 2.0.0
 * @date 2021/08/06
 */
@Data
public class SaveActivityPageDTO {

    @NotNull(message = "主键id不能为空", groups = {SaveActivityPageDTO.Update.class, SaveActivityPageDTO.Adorn.class})
    @ApiModelProperty(value = "ID")
    private Long id;

    @NotNull(message = "类型不能为空", groups = {SaveActivityPageDTO.Add.class, SaveActivityPageDTO.Update.class})
    @ApiModelProperty(value = "类型: 1.平台 2.商家")
    private Integer type;

    @NotBlank(message = "活动页名称不能为空", groups = {SaveActivityPageDTO.Add.class, SaveActivityPageDTO.Update.class})
    @Size(max = 60, message = "活动页名称最长60个字符", groups = {SaveActivityPageDTO.Add.class, SaveActivityPageDTO.Update.class})
    @ApiModelProperty(value = "活动页名称")
    private String name;

    @NotNull(message = "开始时间不能为空", groups = {SaveActivityPageDTO.Add.class, SaveActivityPageDTO.Update.class})
    @ApiModelProperty(value = "开始时间")
    private Long startTime;

    @NotNull(message = "结束时间不能为空", groups = {SaveActivityPageDTO.Add.class, SaveActivityPageDTO.Update.class})
    @ApiModelProperty(value = "结束时间")
    private Long endTime;

    @NotNull(message = "适用环境不能为空", groups = {SaveActivityPageDTO.Add.class, SaveActivityPageDTO.Update.class})
    @ApiModelProperty(value = "适用环境: 1.WEB 2.H5 3.小程序 4.APP")
    private Integer environment;

    @NotNull(message = "活动模板ID不能为空", groups = {SaveActivityPageDTO.Add.class, SaveActivityPageDTO.Update.class})
    @ApiModelProperty(value = "活动模板ID")
    private Long templateId;

    @NotBlank(message = "活动模板名称不能为空", groups = {SaveActivityPageDTO.Add.class, SaveActivityPageDTO.Update.class})
    @ApiModelProperty(value = "活动模板名称")
    private String templateName;

    @NotBlank(message = "活动模板图片不能为空", groups = {SaveActivityPageDTO.Add.class, SaveActivityPageDTO.Update.class})
    @ApiModelProperty(value = "活动模板图片")
    private String templatePicUrl;

    @NotNull(message = "商城ID不能为空", groups = {SaveActivityPageDTO.Add.class, SaveActivityPageDTO.Update.class})
    @ApiModelProperty(value = "商城ID")
    private Long shopId;

    @NotBlank(message = "商城名称不能为空", groups = {SaveActivityPageDTO.Add.class, SaveActivityPageDTO.Update.class})
    @ApiModelProperty(value = "商城名称")
    private String shopName;

    @NotEmpty(message = "装修内容不能为空", groups = {SaveActivityPageDTO.Adorn.class})
    @ApiModelProperty(value = "装修内容")
    private Map<String, Object> adornContent;

    public interface Add {}
    public interface Update {}
    public interface Adorn {}
}
